package com.woniu.guoguo.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniu.guoguo.model.MenuComments;
import com.woniu.guoguo.dao.MenuCommentsMapper;
import com.woniu.guoguo.service.IMenuCommentsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Richie
 * @since 2020-11-04
 */
@Service
public class MenuCommentsServiceImpl extends ServiceImpl<MenuCommentsMapper, MenuComments> implements IMenuCommentsService {
    @Autowired
    private MenuCommentsMapper menuCommentsMapper;

    @Override
    public IPage<MenuComments> findCommentsByMenuId(Page<MenuComments> page, int menuId) {
        return menuCommentsMapper.findCommentsByMenuId(page,menuId);
    }

    @Override
    public void insertAMenuComment(MenuComments menuComments) {
        menuCommentsMapper.insertAMenuComment(menuComments);
    }
}
